﻿using System;
using System.Linq;
using System.Runtime.CompilerServices;
using AutoR.Helpers;
using AutoR.Services;
using LiteDB;
using Prism.Mvvm;

namespace AutoR.Models
{
	// Token: 0x02000208 RID: 520
	public class GlobalConfig : BindableBase
	{
		// Token: 0x1700039C RID: 924
		// (get) Token: 0x06000BE2 RID: 3042 RVA: 0x0006DAA6 File Offset: 0x0006BCA6
		// (set) Token: 0x06000BE3 RID: 3043 RVA: 0x0006DAB0 File Offset: 0x0006BCB0
		public int Id
		{
			[CompilerGenerated]
			get
			{
				return this.<Id>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<Id>k__BackingField == value)
				{
					return;
				}
				this.<Id>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Id);
			}
		}

		// Token: 0x1700039D RID: 925
		// (get) Token: 0x06000BE4 RID: 3044 RVA: 0x0006DADD File Offset: 0x0006BCDD
		// (set) Token: 0x06000BE5 RID: 3045 RVA: 0x0006DAE8 File Offset: 0x0006BCE8
		public string Type
		{
			[CompilerGenerated]
			get
			{
				return this.<Type>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<Type>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<Type>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Type);
			}
		}

		// Token: 0x1700039E RID: 926
		// (get) Token: 0x06000BE6 RID: 3046 RVA: 0x0006DB19 File Offset: 0x0006BD19
		// (set) Token: 0x06000BE7 RID: 3047 RVA: 0x0006DB24 File Offset: 0x0006BD24
		public TimeSpan ResetTime
		{
			get
			{
				return this._resetTime;
			}
			set
			{
				if (TimeSpan.Equals(this._resetTime, value))
				{
					return;
				}
				this._resetTime = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.ResetTime);
				this.CheckTime = Extensions.GetCheckTime(this._resetTime, false);
			}
		}

		// Token: 0x1700039F RID: 927
		// (get) Token: 0x06000BE8 RID: 3048 RVA: 0x0006DB66 File Offset: 0x0006BD66
		// (set) Token: 0x06000BE9 RID: 3049 RVA: 0x0006DB70 File Offset: 0x0006BD70
		[BsonIgnore]
		public DateTime CheckTime
		{
			[CompilerGenerated]
			get
			{
				return this.<CheckTime>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (DateTime.Equals(this.<CheckTime>k__BackingField, value))
				{
					return;
				}
				this.<CheckTime>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.CheckTime);
			}
		}

		// Token: 0x170003A0 RID: 928
		// (get) Token: 0x06000BEA RID: 3050 RVA: 0x0006DBA0 File Offset: 0x0006BDA0
		// (set) Token: 0x06000BEB RID: 3051 RVA: 0x0006DBA8 File Offset: 0x0006BDA8
		public int TaskMinDelay
		{
			[CompilerGenerated]
			get
			{
				return this.<TaskMinDelay>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<TaskMinDelay>k__BackingField == value)
				{
					return;
				}
				this.<TaskMinDelay>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.TaskMinDelay);
			}
		}

		// Token: 0x170003A1 RID: 929
		// (get) Token: 0x06000BEC RID: 3052 RVA: 0x0006DBD5 File Offset: 0x0006BDD5
		// (set) Token: 0x06000BED RID: 3053 RVA: 0x0006DBE0 File Offset: 0x0006BDE0
		public int TaskMaxDelay
		{
			[CompilerGenerated]
			get
			{
				return this.<TaskMaxDelay>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<TaskMaxDelay>k__BackingField == value)
				{
					return;
				}
				this.<TaskMaxDelay>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.TaskMaxDelay);
			}
		}

		// Token: 0x170003A2 RID: 930
		// (get) Token: 0x06000BEE RID: 3054 RVA: 0x0006DC0D File Offset: 0x0006BE0D
		// (set) Token: 0x06000BEF RID: 3055 RVA: 0x0006DC18 File Offset: 0x0006BE18
		public int MinSeconds
		{
			[CompilerGenerated]
			get
			{
				return this.<MinSeconds>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<MinSeconds>k__BackingField == value)
				{
					return;
				}
				this.<MinSeconds>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.MinSeconds);
			}
		}

		// Token: 0x170003A3 RID: 931
		// (get) Token: 0x06000BF0 RID: 3056 RVA: 0x0006DC45 File Offset: 0x0006BE45
		// (set) Token: 0x06000BF1 RID: 3057 RVA: 0x0006DC50 File Offset: 0x0006BE50
		public int MaxSeconds
		{
			[CompilerGenerated]
			get
			{
				return this.<MaxSeconds>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<MaxSeconds>k__BackingField == value)
				{
					return;
				}
				this.<MaxSeconds>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.MaxSeconds);
			}
		}

		// Token: 0x170003A4 RID: 932
		// (get) Token: 0x06000BF2 RID: 3058 RVA: 0x0006DC7D File Offset: 0x0006BE7D
		// (set) Token: 0x06000BF3 RID: 3059 RVA: 0x0006DC88 File Offset: 0x0006BE88
		public bool RandomSleep
		{
			[CompilerGenerated]
			get
			{
				return this.<RandomSleep>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<RandomSleep>k__BackingField == value)
				{
					return;
				}
				this.<RandomSleep>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.RandomSleep);
			}
		}

		// Token: 0x170003A5 RID: 933
		// (get) Token: 0x06000BF4 RID: 3060 RVA: 0x0006DCB5 File Offset: 0x0006BEB5
		// (set) Token: 0x06000BF5 RID: 3061 RVA: 0x0006DCC0 File Offset: 0x0006BEC0
		public bool AutoOneColume
		{
			[CompilerGenerated]
			get
			{
				return this.<AutoOneColume>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<AutoOneColume>k__BackingField == value)
				{
					return;
				}
				this.<AutoOneColume>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.AutoOneColume);
			}
		}

		// Token: 0x170003A6 RID: 934
		// (get) Token: 0x06000BF6 RID: 3062 RVA: 0x0006DCED File Offset: 0x0006BEED
		// (set) Token: 0x06000BF7 RID: 3063 RVA: 0x0006DCF8 File Offset: 0x0006BEF8
		public bool CampaignSL
		{
			[CompilerGenerated]
			get
			{
				return this.<CampaignSL>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<CampaignSL>k__BackingField == value)
				{
					return;
				}
				this.<CampaignSL>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.CampaignSL);
			}
		}

		// Token: 0x170003A7 RID: 935
		// (get) Token: 0x06000BF8 RID: 3064 RVA: 0x0006DD25 File Offset: 0x0006BF25
		// (set) Token: 0x06000BF9 RID: 3065 RVA: 0x0006DD30 File Offset: 0x0006BF30
		public string LockWhitelist
		{
			[CompilerGenerated]
			get
			{
				return this.<LockWhitelist>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<LockWhitelist>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<LockWhitelist>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.LockWhitelist);
			}
		}

		// Token: 0x170003A8 RID: 936
		// (get) Token: 0x06000BFA RID: 3066 RVA: 0x0006DD61 File Offset: 0x0006BF61
		// (set) Token: 0x06000BFB RID: 3067 RVA: 0x0006DD6C File Offset: 0x0006BF6C
		public bool LockOne
		{
			[CompilerGenerated]
			get
			{
				return this.<LockOne>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<LockOne>k__BackingField == value)
				{
					return;
				}
				this.<LockOne>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.LockOne);
			}
		}

		// Token: 0x170003A9 RID: 937
		// (get) Token: 0x06000BFC RID: 3068 RVA: 0x0006DD99 File Offset: 0x0006BF99
		// (set) Token: 0x06000BFD RID: 3069 RVA: 0x0006DDA4 File Offset: 0x0006BFA4
		public bool Rank
		{
			[CompilerGenerated]
			get
			{
				return this.<Rank>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<Rank>k__BackingField == value)
				{
					return;
				}
				this.<Rank>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Rank);
			}
		}

		// Token: 0x170003AA RID: 938
		// (get) Token: 0x06000BFE RID: 3070 RVA: 0x0006DDD1 File Offset: 0x0006BFD1
		// (set) Token: 0x06000BFF RID: 3071 RVA: 0x0006DDDC File Offset: 0x0006BFDC
		public bool Eat
		{
			[CompilerGenerated]
			get
			{
				return this.<Eat>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<Eat>k__BackingField == value)
				{
					return;
				}
				this.<Eat>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Eat);
			}
		}

		// Token: 0x170003AB RID: 939
		// (get) Token: 0x06000C00 RID: 3072 RVA: 0x0006DE09 File Offset: 0x0006C009
		// (set) Token: 0x06000C01 RID: 3073 RVA: 0x0006DE14 File Offset: 0x0006C014
		public int EatType
		{
			[CompilerGenerated]
			get
			{
				return this.<EatType>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<EatType>k__BackingField == value)
				{
					return;
				}
				this.<EatType>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.EatTypeText);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.EatType);
			}
		}

		// Token: 0x170003AC RID: 940
		// (get) Token: 0x06000C02 RID: 3074 RVA: 0x0006DE4C File Offset: 0x0006C04C
		// (set) Token: 0x06000C03 RID: 3075 RVA: 0x0006DE54 File Offset: 0x0006C054
		public bool MusicStart
		{
			[CompilerGenerated]
			get
			{
				return this.<MusicStart>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<MusicStart>k__BackingField == value)
				{
					return;
				}
				this.<MusicStart>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.MusicStart);
			}
		}

		// Token: 0x170003AD RID: 941
		// (get) Token: 0x06000C04 RID: 3076 RVA: 0x0006DE81 File Offset: 0x0006C081
		// (set) Token: 0x06000C05 RID: 3077 RVA: 0x0006DE8C File Offset: 0x0006C08C
		public bool AutoSecretary
		{
			[CompilerGenerated]
			get
			{
				return this.<AutoSecretary>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<AutoSecretary>k__BackingField == value)
				{
					return;
				}
				this.<AutoSecretary>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.AutoSecretary);
			}
		}

		// Token: 0x170003AE RID: 942
		// (get) Token: 0x06000C06 RID: 3078 RVA: 0x0006DEB9 File Offset: 0x0006C0B9
		// (set) Token: 0x06000C07 RID: 3079 RVA: 0x0006DEC4 File Offset: 0x0006C0C4
		public bool AutoSleep
		{
			[CompilerGenerated]
			get
			{
				return this.<AutoSleep>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<AutoSleep>k__BackingField == value)
				{
					return;
				}
				this.<AutoSleep>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.AutoSleep);
			}
		}

		// Token: 0x170003AF RID: 943
		// (get) Token: 0x06000C08 RID: 3080 RVA: 0x0006DEF4 File Offset: 0x0006C0F4
		[BsonIgnore]
		public string EatTypeText
		{
			get
			{
				if (this.EatType < 0)
				{
					return "";
				}
				string[] array = (from i in Runtime.Configs.ShipCookbook
				where Runtime.Game.User.LiveCookInfo.cookbook.Contains(i.cid.ToString())
				select i.title).ToArray<string>();
				if (!array.Any<string>())
				{
					return "";
				}
				return array[this.EatType];
			}
		}

		// Token: 0x06000C09 RID: 3081 RVA: 0x0006DF7E File Offset: 0x0006C17E
		public GlobalConfig()
		{
			this.<Id>k__BackingField = 1;
			this.<Type>k__BackingField = "GlobalConfig";
			this.<TaskMinDelay>k__BackingField = 1;
			this.<TaskMaxDelay>k__BackingField = 10;
			this.<MinSeconds>k__BackingField = 5;
			this.<MaxSeconds>k__BackingField = 30;
			base..ctor();
		}

		// Token: 0x04000A55 RID: 2645
		private TimeSpan _resetTime;
	}
}
